export type SearchParams = {
  pageNum?: number
  pageSize?: number
  username?: string
  nickname?: string
  status?: number
  beginTime?: string
  endTime?: string
}

export type AdminItem = {
  admin_id: number
  username: string
  nickname: string
  status: number
  post_id: number
  role_id: number
  dept_id: number
  post_name: string
  role_name: string
  dept_name: string
  profile_photo: string
  phone: string
  email: string
  note: string
  create_time: string
}

export type ListResult = {
  pageNum: number
  pageSize: number
  rows: AdminItem[]
  total: number
}

export type AdminIdParams = {
  admin_id: number
}

// 添加/修改管理员
export type AdminParams = {
  admin_id?: number
  dept_id?: number
  email?: string
  nickname?: string
  note?: string
  phone?: string
  post_id?: number
  role_id?: number
  status?: number
  username?: string
  password?: string
}

//修改状态
export type AdminStateParams = {
  admin_id: number
  status: number
}

//重置密码
export type ResetPasswordParams = {
  admin_id: number
  password: string
}

//修改管理员个人信息
export type PersonalParams = {
  admin_id: number
  email?: string
  nickname?: string
  note?: string
  phone?: string
  profile_photo?: string
  username?: string
}

//修改管理员个人密码
export type PersonalPasswordParams = {
  admin_id: number
  newPassword: string
  password: string
  resetPassword: string
}
